package com.lvhx.springboot.callservice;

public class BaseAction implements ServiceExecutorAware {
    private IServiceExecutor serviceExecutor;

    @Override
    public void setServiceExecutor(IServiceExecutor serviceExecutor) {
        this.serviceExecutor = serviceExecutor;
    }

    protected <T> T callService(String serviceName, Object request) {
        Object object = this.serviceExecutor.execute(serviceName, request);
        return (T) object;
    }
}
